package com.cheng.cms.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.text.SimpleDateFormat;
import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Parking {
    private String parkingNo;
    private String buildingNo;
    private String roomNo;
    private String carNum;
    private String parkingFee;
    private int parkingID;
    private Date buyDate;

    public String getBuyDate() {
        Date currentTime = buyDate;
        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
        String dateString = formatter.format(currentTime);
        return dateString;
    }

}
